package com.example.mybatisdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mybatisdemo.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper extends BaseMapper<User> {

   @Select("select * from user where id = #{id}")
   User queryById(Integer id);
   @Update("update user set name = #{name},age = #{age} where id = #{id}")
   void update(User user);
}
